﻿<%@ Page Title="" Language="C#" MasterPageFile="" Inherits="System.Web.Mvc.ViewPage<IEnumerable<fivescomplement.Models.GetQuestionsStudent_Result  >>" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >

<title>Take A Survey!</title>

    <head>
        <link href="../../Content/Survey.css" rel="stylesheet" type="text/css" />
    </head>

<body>
    <div id="header">

        <img src ="../../Content/Images/Banner.png" />

        <% using (Html.BeginForm()) { %>

                <fieldset>
                 <% if (Model.Count() > 0)
                    { %>
                    <table id="table">
                        <tr>
                            <th></th>
                            <th></th>
                            <th></th>
                        </tr>
                    <% int test;%>
                    <% test = 0;%>
                    <% foreach (var item in Model)
                       { %>
                        <tr>
                            <td>
                            <%: Html.Hidden("CourseID" + test.ToString(), item.CourseID)%>
                            <%: Html.Hidden("QuestionTypeID" + test.ToString(), item.QuestionTypeID)%>
                            <%: Html.Hidden("QuestionID" + test.ToString(), item.QuestionID)%>
                            <%: item.Question%>
                            </td>

                            <td>
                                 <% if (item.QuestionTypeID == 1)
                                    { %> 
                                    <%: Html.RadioButton("5Scale" + test.ToString(), 5, false)%> Excellent
                                    <%: Html.RadioButton("5Scale" + test.ToString(), 4, false)%> Very Good
                                    <%: Html.RadioButton("5Scale" + test.ToString(), 3, false)%> Fair
                                    <%: Html.RadioButton("5Scale" + test.ToString(), 2, false)%> Poor
                                    <%: Html.RadioButton("5Scale" + test.ToString(), 1, false)%> Very Poor
                                
                                <% } %>

                                <% if (item.QuestionTypeID == 2)
                                   { %> 
                                    <%: Html.RadioButton("T/F" + test.ToString(), 0, false)%> False    
                                    <%: Html.RadioButton("T/F" + test.ToString(), 1, false)%> True
                                <% } %>

                                <% if (item.QuestionTypeID == 3)
                                   { %>
                                        <br />
                                        <br />
                                        </td>
                                        </tr>
                                    </table>
                                    <table>
                                    <tr>
                                    <td>
                                    <%: Html.TextArea("Comments" + test.ToString(), null, new { @cols = "70", @rows = "6" })%>
                                <% } %>
                                <% test += 1;%>
                            </td>
                            <!--<td>
                                <%: Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) %> |
                                <%: Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ })%> |
                                <%: Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })%>
                            </td>-->
                        </tr>
    
                    <% } %>

                    </table>

                    <p>
                        <!-- <%: Html.ActionLink("Create New", "Create") %>-->
                    </p>
                    <p>
                        <input type="submit" value="Submit" />
                    </p>
                
                <% } %>
                <% else
                    { %>
                    <h2 >Survey has already been completed.</h2>
                <% } %>
                </fieldset>
            </div>
        <% } %>
    </body>
</html>

